#include "VLauncher.h"

VLauncher::VLauncher(QWidget *parent)
    : QWidget(parent)
{
    start_button = new QPushButton("Start Servers");
    settings_button = new QPushButton("Settings");
    close_button = new QPushButton("Quit");

    layoutp = new QVBoxLayout;
    layoutp->addWidget(start_button);
    layoutp->addWidget(settings_button);
    layoutp->addWidget(close_button);

    this->setLayout(layoutp);

    QObject::connect(close_button, SIGNAL(clicked()), qApp, SLOT(quit()));
    QObject::connect(start_button, SIGNAL(clicked()), this, SLOT(start()));
}

VLauncher::~VLauncher()
{
    delete start_button;
    delete settings_button;
    delete close_button;

    delete layoutp;
}

void VLauncher::start()
{
    v_server = new VServer;
    v_server->setVisible(true);
    this->setVisible(false);
}

void VLauncher::settings()
{

}
